package com.martin.lib_base.base

import com.martin.lib_base.interfaces.IGetData
import com.martin.lib_base.ktx.loge
import com.martin.lib_base.model.PageModel

/**
 * @author：孟凡华
 * @date：2022/1/29 11:20
 */
abstract class BasePageViewModel : BaseViewModel(), IGetData {

    //分页
    val pageModel by lazy {
        PageModel()
    }

    //刷新
    open fun refresh() {
        loge("BasePageViewModel --- refresh")
        pageModel.refresh()
        getData()
    }

    //加载更多
    open fun loadMore() {
        loge("BasePageViewModel --- loadMore")
        pageModel.loadMore()
        getData()
    }

}